home *** CD-ROM | disk | FTP | other *** search
/ PC-Blue - MS DOS Public Domain Library / PC-Blue MS-DOS Public Domain Library - NYACC.iso / vol076 / batprot.col < prev    next >
Encoding:
Text File  |  1987-01-14  |  1.5 KB  |  67 lines

  1.  
  2. Batch protocol for MODEM7 and XMODEM multi-file transfer
  3.  
  4. Each must specify batch since different treatment of ACK
  5. as first character of "block" is needed.
  6.  
  7. CAN character is frequently tested for and interpreted as cancel everything
  8. 1 sec timeout on characters usually
  9.  
  10. CHECKSUM used on filename sequence even if CRC to be used in file transfer
  11.  
  12. on error during filename sequence, both return to beginning
  13.     sender returns to NAK wait
  14.     and receiver returns to NAK send
  15.  
  16. Time sequence of transfer:
  17. SENDER                    RECEIVER
  18.  
  19. waits for NAK with 80 sec timeout
  20. clear checksum
  21.                     NAK  at 10 sec interval 'til ACK or CAN
  22. ACK                    
  23.                     waits for filename chars 1 sec timeout
  24.                     on error goes to above NAK
  25. Loop 11 times (though filename buffer
  26.     allows more)
  27.  
  28.     (Strip parity bit)
  29.     send next filename character
  30.     (in CP/M FCB form, no dot,
  31.     blank filled, last 3 bytes
  32.     are type)
  33.     add to checksum
  34.     await ACK 1 second timeout
  35.                     add to checksum
  36.                     ACK
  37. End Loop
  38.  
  39. EOF (CTRL-Z)
  40. add to checksum
  41.                     add to checksum
  42.                     send Checksum byte
  43.                     await ACK
  44.                     (note: if receives noise here,
  45.                     one end may proceed to
  46.                     normal file transfer, and other to
  47.                     restart filename and hang)
  48. verifies checksum
  49. OKNMCH (ACK) or BDNMCH ("u")
  50.  
  51.         Normal file transfer starts
  52.                     NAK or "C"
  53. SOH   start of block
  54. .
  55. .
  56. .
  57. EOT   end of file
  58.                     ACK
  59.  
  60.  
  61. expects NAK to start next filename
  62.                     NAK
  63. ACK  set up receiver for filename
  64. EOT  as first char of filename 
  65.     terminates batch transfer
  66.     (possibly as ANY character
  67.     of filename)
  68.